import java.util.Comparator;
import java.util.Deque;

public class Animal {
    public void eat() {
        System.out.println("eat");
    }
    public Animal() {
        func();
    }
    public void func() {
        System.out.println("B.func()");
    }
}

class Dog extends Animal {
    public Dog() {
        super();
    }

    @Override
    public void func() {
        System.out.println("D.func()");
    }

    public static void main(String[] args) {
        Dog d = new Dog();
    }
    public void cat() {
        System.out.println(this);
    }
}

class Cat extends Animal {

}

abstract class Bird extends Dog implements Deque {

}


